import request from '@/utils/request'
import { unionApiUrl } from '@/api/config'

/**
 * 获取人员列表
 */
export function getPersonList(data) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/getPageInspPersonnelInfo',
        method: 'post',
        data
    })
}

/**
 * 添加人员
 */
export function addPerson(data) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/insertSelective',
        method: 'post',
        data
    })
}

/**
 * 获取人员详情
 */
export function getPersonDetail(params) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/getInspPersonnelInfoById',
        method: 'get',
        params
    })
}

/**
 * 编辑人员
 */
 export function updatePerson(data) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/updateByPrimaryKeySelective',
        method: 'post',
        data
    })
}

/**
 * 删除人员
 */
export function deletePerson(params) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/deleteByPrimaryKey',
        method: 'post',
        params
    })
}

/**
 * 获取监督人员列表
 */
 export function getSupervisorList(data) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/getPageInspSupervisorPersonnel',
        method: 'post',
        data
    })
}

/**
 * 添加监督人员
 */
export function addSupervisor(data) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/insertSelective',
        method: 'post',
        data
    })
}

/**
 * 获取监督人员详情
 */
export function getSupervisorDetail(params) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/getInspSupervisorPersonnelById',
        method: 'get',
        params
    })
}

/**
 * 编辑监督人员
 */
 export function updateSupervisor(data) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/updateByPrimaryKeySelective',
        method: 'post',
        data
    })
}

/**
 * 修改监督人员状态
 */
 export function updateSupervisorStatus(data) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/updateByEnableDisable',
        method: 'post',
        data
    })
}

/**
 * 删除监督人员
 */
export function deleteSupervisor(params) {
    return request({
        url: unionApiUrl + '/inspSupervisorPersonnel/deleteByPrimaryKey',
        method: 'post',
        params
    })
}

/**
 * 导入纪检人员
 */
export function importPerson(data) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/inspPersonnelInfoImport',
        method: 'post',
        data
    })
}

/**
 * 导出纪检人员
 */
export function exportPerson(data) {
    return request({
        url: unionApiUrl + '/inspPersonnelInfo/getInspPersonnelInfoExport',
        method: 'post',
        data
    })
}